<template>
  <div class="main-container-app">
    <el-row class="form-contain">
      <suggestion-form @handleQueryParkingMag="handleQueryParkingMag"></suggestion-form>
    </el-row>
    <div class="table-contain">
      <suggestion-table :searchList="parkingComplaints" :listLoadingParkingMag="loading"
                        @handleCurrentChangeParkingMag="handleCurrentChangeParkingMag"
                        @handleSizeChangeParkingMag="handleSizeChangeParkingMag"></suggestion-table>
    </div>
  </div>
</template>

<script>
  /* eslint-disable */
  import SuggestionForm from "./hotSuggestionChild/hotSuggestionForm";
  import SuggestionTable from "./hotSuggestionChild/hotSuggestionTable";

  export default {
    components: {
      SuggestionTable,
      SuggestionForm
    },
    data() {
      return {
        parkingComplaints: null,
        loading: false,
        queryData:{
          complaints_obj: '',
          complaints_type: '',
          complaints_count: '',
          start_time:'',
          end_time:'',
          handle_status: '',
          handle_people:'',
          finish_time:''
        },
        listQuery: {
          page: 1,
          limit: 20
        }
      }
    },
    methods: {
      handleQueryParkingMag(val) {
        this.queryData = val
        this.listQuery.page=1
        this.listQuery.limit=20
        this.getDataListParkingMag()
      },
      handleSizeChangeParkingMag(val) {
        this.listQuery.limit = val
        this.listQuery.page = 1
        this.getDataListDouPay()
      },
      handleCurrentChangeParkingMag(val) {
        this.listQuery.page = val;

        this.getDataListParkingMag()
      },
      getDataListParkingMag() {
        this.loading = true;
        this.parkingComplaints={limit:{},list:[]};
        this.parkingComplaints.limit.total = 5;
        this.parkingComplaints.list= [
          {
            complaints_obj: '',
            complaints_type: '',
            complaints_count: '',
            start_time:'',
            end_time:'',
            handle_status: '',
            handle_people:'',
            finish_time:''
          }, {
            complaints_obj: '',
            complaints_type: '',
            complaints_count: '',
            start_time:'',
            end_time:'',
            handle_status: '',
            handle_people:'',
            finish_time:''
          }],
          this.loading = false;
      }
    }

  }
</script>

<style scoped>
  .parkingMag {
    padding: 32px;
    background-color: rgb(240, 242, 245);
  }
</style>
